class ForumThread < ActiveRecord::Base
  belongs_to	:forum
  has_many	:posts, :dependent => :destroy
  belongs_to	:user

  #Named Scopes
  named_scope :oldest_first, :order => "updated_at ASC"
  named_scope :newest_first, :order => "updated_at DESC"

  #Security, protect against mass assignment
  attr_accessible :title, :forum_id
end
